package com.emergency.evaluate.domain;

import com.emergency.base.domain.BaseEntity;
import com.emergency.base.domain.Scenar;

import javax.persistence.*;

/**
 *指标提取的临时表，指标与想定方案匹配
 *  Created by Administrator on 2020/3/12.
 */
@Entity
@Table(name = "eva_extract")
public class Extract extends BaseEntity {


    //该表上指标对应的权重
    private double  weight;

    //临时指标表的创建人
    private String founder;



    //将对应的想定编号与想定实体类对应
    @OneToOne (targetEntity=Scenar.class, fetch= FetchType.LAZY)
    @JoinColumn(name="scenar_id",referencedColumnName="id")
    private Scenar scenar;

    //将对应的指标编号与指标实体类对应
    @OneToOne (targetEntity=Indicator.class, fetch= FetchType.LAZY)
    @JoinColumn(name="indicator_id",referencedColumnName="id")
    private Indicator indicator;


    public double getWeight() {
        return weight;
    }

    public void setWeight(double weight) {
        this.weight = weight;
    }

    public String getFounder() {
        return founder;
    }

    public void setFounder(String founder) {
        this.founder = founder;
    }

    public Scenar getScenar() {
        return scenar;
    }

    public void setScenar(Scenar scenar) {
        this.scenar = scenar;
    }

    public Indicator getIndicator() {
        return indicator;
    }

    public void setIndicator(Indicator indicator) {
        this.indicator = indicator;
    }


}
